import request from '@/utils/request'

// 查询分页列表
export function listLabExperiment(size, current) {
  return request.get('/items/labExperiment/page', { params: {
    size: size,
    current: current
  }})
}

// 根据id查询实验
export function listLabExperimentId(id) {
  return request.get(`/items/labExperiment/${id}`)
}

// 添加实验
export function addLabExperiment(addData) {
  return request.post('/items/labExperiment', { ...addData })
}

// 修改实验信息
export function editLabExperiment(editData) {
  return request.put('/items/labExperiment', { ...editData }) // 对象展开运算符
}

// 根据id删除实验信息
export function delLabExperiment(id) {
  return request.delete(`/items/labExperiment/${id}`)
}
